﻿using System;
using UnityEngine;

// Token: 0x0200001A RID: 26
public class MadnessElevatorScript : MonoBehaviour
{
	// Token: 0x06000077 RID: 119 RVA: 0x0000D759 File Offset: 0x0000B959
	private void Start()
	{
		PauseManager.main.TryUnlockAchievement(15);
	}

	// Token: 0x06000078 RID: 120 RVA: 0x0000D768 File Offset: 0x0000B968
	private void Update()
	{
		if (Input.GetKeyDown(KeyCode.E) && GameManager.main.playerBody.torso.transform.position.x > this.playerXDistance)
		{
			this.animatorToPlay.Play(this.animName);
			Object.Destroy(this);
		}
	}

	// Token: 0x04000144 RID: 324
	public string animName;

	// Token: 0x04000145 RID: 325
	public Animator animatorToPlay;

	// Token: 0x04000146 RID: 326
	public float playerXDistance;
}
